<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <button id="btn">click</button>
    <script>
      /*
        1. 标签特性绑定
        2. 对象属性绑定
        3. 标准事件绑定 ✳
      */
      const btn = document.getElementById("btn");
      btn.addEventListener(
        "click",
        function () {
          console.log("hello");
        },
        {
          //  配置项，设定一些额外的功能
          once: true,
          // capture:
        }
      );

      // btn.onclick = function(){}
    </script>
  </body>
</html>
